from typing import Optional, Any

from pydantic import BaseModel


class BaseResponse(BaseModel):
    data: Optional[object] = None
    message: str = None
    code: int


class SuccessResponse(BaseResponse):
    message = "Success"
    code = 200


class FailureResponse(BaseResponse):
    error: Any
